#ifndef BTFORM_H
#define BTFORM_H

#include <QWidget>
#include <QEvent>
#include <QPropertyAnimation>

namespace Ui {
class BtForm;
}

class BtForm : public QWidget
{
    Q_OBJECT


public:
    explicit BtForm(QWidget *parent = nullptr);
    ~BtForm();
    void seticon(const QString btIcon, const QString content, int pageId);
    virtual void mousePressEvent(QMouseEvent *event);
    virtual void enterEvent(QEnterEvent* event) override;
    virtual void leaveEvent(QEvent *event) override;
    void showAnimal();
    void clearBg();
    int getId();

signals:
    void btClick(int id);


private:
    Ui::BtForm *ui;
    int pageId = 0;
    bool selected = false; // 新增：记录是否选中
    bool Start = true;
    QPropertyAnimation* animal_line1;
    QPropertyAnimation* animal_line2;
    QPropertyAnimation* animal_line3;
    QPropertyAnimation* animal_line4;
};

#endif // BTFORM_H
